using System;
using System.Collections;
using CE.Database;
/// <summary>
/// Summary description for UserProfileDB
/// </summary>
/// 
namespace CE.HomeRefinance
{
    public class HFPreferLoanDB
    {
        public HFPreferLoanDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(HFPerferLoan preferloan)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocHFPreferLoanInsertUpdateSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@HFLoanID", preferloan.HFLoanID);
            _sPara.Add("@HFID", preferloan.HFID);
            _sPara.Add("@HFPersonnelID", preferloan.HFPersonnelID);
            _sPara.Add("@HFFinNature", preferloan.HFFinNature);
            _sPara.Add("@HFFinIns", preferloan.HFFinIns);
            _sPara.Add("@HFFinMargin", preferloan.HFFinMargin);
            _sPara.Add("@HFLoanTenure", preferloan.HFLoanTenure);
            _sPara.Add("@HFPurchaseDate", preferloan.HFPurchaseDate);
            _sPara.Add("@HFCurrentBank", preferloan.HFCurrentBank);
            _sPara.Add("@HFOutLoanAmount", preferloan.HFOutLoanAmount);
            _sPara.Add("@HFPurchaseMortage", preferloan.HFPurchaseMortage);
            _sPara.Add("@HFCPFMonthRepay", preferloan.HFCPFMonthRepay);
            _sPara.Add("@HFCPFMonthRepayAmount", preferloan.HFCPFMonthRepayAmount);
            _sPara.Add("@HFCPFSLFee", preferloan.HFCPFSLFee);
            _sPara.Add("@HFCPFSLFeeAmount", preferloan.HFCPFSLFeeAmount);
            _sPara.Add("@HFIsUseCPF", preferloan.HFIsUseCPF);
            _sPara.Add("@ViewedDetailId", preferloan.ViewedDetailId);
            _sPara.Add("@Status", preferloan.Status);
            _sPara.Add("@Info1", preferloan.Info1);
            _sPara.Add("@Info2", preferloan.Info2);
            _sPara.Add("@Info3", preferloan.Info3);
            _sPara.Add("@Info4", preferloan.Info4);
            _sPara.Add("@Info5", preferloan.Info5);
            _sPara.Add("@Info6", preferloan.Info6);
            _sPara.Add("@Info7", preferloan.Info7);
            _sPara.Add("@Info8", preferloan.Info8);
            _sPara.Add("@Info9", preferloan.Info9);
            _sPara.Add("@Info10", preferloan.Info10);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

        public bool Update()
        {
            return true;
        }

        public bool Delete()
        {
            return true;
        }

    }
}